// ========================
// = Library Dependancies =
// ========================

Plex.Lib.JS.load('Com.Module');
Plex.Lib.JS.load('Com.Page');
Plex.Lib.JS.load('Com.Product');
Plex.Lib.JS.load('UI.Input.Context');
Plex.Lib.JS.load('UI.Input.Toolbar');
Plex.Lib.JS.load('UI.Page.Popup');
Plex.Lib.JS.load('Data.Global');

// =====================
// = Body Context Menu =
// =====================

this.context = new Plex.UI.Input.Context(document);
this.context.addOption("Open Intro Page",function()
{
	new Plex.Com.Page.load(0)
},'application');

this.context.addOption("Open Control Panel",function()
{
	var pop = new Plex.UI.Page.Popup();
	pop.open();
	
},'application');

this.context.addOption("Close GUI Admin",window.close,'cancel');


// ===========================
// = Create And Open Toolbar =
// ===========================

var toolbar = new Plex.UI.Input.Toolbar("Property GUI Admin");

toolbar.addButton("Close Admin",function(){
	window.close();
});

toolbar.addButton("Reload Admin",function(){
	window.location = window.location;
});

toolbar.addSeperator();

toolbar.addButton("Open Intro Page",function(){
	new Plex.Com.Page.load(0);
});

toolbar.addButton("Open Control Panel",function(){
	var pop = new Plex.UI.Page.Popup();
	pop.open();
});

toolbar.open();